import request from '@/utils/request'

export const prefix = 'flowable';

// 查询请假列表
export function listLeave(page,data) {
  return request({
    url: `/${prefix}/leave/list`,
    method: 'post',
    params: page,
    data: data
  })
}

// 查询请假详细
export function getLeave(id) {
  return request({
    url: `/${prefix}/leave/detail/${id}`,
    method: 'get'
  })
}

// 新增请假
export function addLeave(data,params) {
  return request({
    url: `/${prefix}/leave/add`,
    method: 'post',
    params: params,
    data: data
  })
}

// 修改请假
export function updateLeave(data) {
  return request({
    url: `/${prefix}/leave/edit`,
    method: 'post',
    data: data
  })
}

// 删除请假
export function delLeave(data) {
  return request({
    url: `/${prefix}/leave/remove`,
    method: 'post',
    data: data
  })
}
